package com.mano.mall.web.shop.member.feign;

import com.alibaba.fastjson.JSONObject;
import com.mano.mall.api.member.QQAuthoriService;
import com.mano.mall.common.base.BaseApiService;
import com.mano.mall.common.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

@FeignClient(value = "mano-mall-member",fallback = QQAuthoriFeignCallBack.class)
public interface QQAuthoriFeign extends QQAuthoriService {
}

@Component
class QQAuthoriFeignCallBack extends BaseApiService implements QQAuthoriFeign{
    @Override
    public BaseResponse<JSONObject> findByOpenId(String qqOpenId) {
        return setResultError("服务器忙，请稍后重试");
    }
}